#include "Form_CameraFocus.h"

int g_lineIndex = -111;
Form_CameraFocus::Form_CameraFocus(int lineIndex,QWidget *parent)
	: QMainWindow(parent)
{
	this->setAttribute(Qt::WA_QuitOnClose, false);
	ui.setupUi(this);
	//this->setWindowModality(Qt::ApplicationModal);
	ui.widget->SetLineIndex(lineIndex);
	g_lineIndex = lineIndex;
}

Form_CameraFocus::~Form_CameraFocus()
{
	ui.widget->MaiFormTabWidget_currentChanged();
}

void Form_CameraFocus::closeEvent(QCloseEvent* e)
{
	ui.widget->MaiFormTabWidget_currentChanged();
	int exposureTime = ui.widget->GetExposureTimeVal(g_lineIndex);
	emit SendMsg2MainForm("ExposureTime",QString::number(exposureTime));
}